HOW TO
EDIT Existing Email Content
- Open “Email Content” Dataverse table.
- Click Export > Export data and download the Excel file of existing email content and keep it somewhere safe as backup.
TIP: Rename the file with client or environment name and the date the file was pulled. - Please read IMPORTANT CONSIDERATIONS section before making any changes.
A. Minor change for a single or a few emails
- Back on Dataverse table screen, click the small down arrow next to EDIT > Edit in new tab.
- Locate and select the appropriate email, then click Edit row using form.
- Make required changes, Save and close.
- Repeat steps above for any additional emails.
B. Major change requiring bulk update
- Make a copy of the backup file and open the new file.
- Make required changes, save, then close it.
- Back on Dataverse table screen click Import > Import data with Dataflows and follow the steps.
ADD New Email Content
- Open “Email Content” Dataverse table.
- Click Export > Export data and download the Excel file of existing email content and keep it somewhere safe as backup.
TIP: Rename the file with client name and date the file was pulled. - Please read IMPORTANT CONSIDERATIONS section before making any changes.
STEP 1 – Power Automate
- Open any existing flow using the Email Content table (referred to as source flow).
Example: Send Welcome Back email to Client - Open the flow this new email content is for (referred to as destination flow).
- On the source flow, find and copy:
- Scope: Get Email Content Template
- Scope: Update EmailTemplate
- On the destination flow, paste both scopes just before the step that sends the email.
- Under Get Email Content Template, update the compose action FlowEmailTemplate Filter:
- Set FlowName and FlowEmailID to appropriate values.
- Under Update EmailTemplate, update compose action ReplacementMapping:
- Add or remove required or unnecessary wildcards (see Wildcards section).
- Unused wildcards are acceptable as long as their Replacement value is valid.
- Take note of wildcards used by this email content, as they are required in STEP 2.
- Add or remove required or unnecessary wildcards (see Wildcards section).
- Use:
@{outputs('Replace_Wildcards_in_EmailSubject')?['body/result']}for Email Subject@{outputs('Replace_Wildcards_in_EmailBody')?['body/result']}for Email Body
NOTE
When adding scopes for subsequent emails in a single flow, make sure to check:
- Update EmailTemplate > Replace Wildcards in EmailSubject
- Update EmailTemplate > Replace Wildcards in EmailBody
Dynamic content under the Text property may need updating.
Example:
@{outputs('Get_EmailContents_by_ID')?['body/tt_emailsubject']}
May need to be updated to:
@{outputs('Get_EmailContents_by_ID_2')?['body/tt_emailsubject']}
Note the incrementation.
STEP 2 – Dataverse
- On Email Content table screen, click the small down arrow next to EDIT > Edit in new tab.
- Click New row > New row using form.
- Toggle Enabled for review to ON for testing.
- Provide Flow Name this email relates to.
- Fill out Email Subject and Email Body, including required wildcards noted in STEP 1.
- Enter Flow Email ID:
- First email for flow:
1 - Additional emails: increment by 1 from the last value
Example: If there are 4 existing emails, the new one becomes5.
- First email for flow:
- Click Save & Close.
Wildcards
When creating or updating emails, refer to Email Content Wildcards table and reuse existing wildcards where possible.
If a required wildcard does not exist:
- Do not use spaces in wildcard names.
- Add it to Email Content Wildcards table.
- Add it to flow [ADMIN]-Generate email for selected Email Content [single email] in the ReplacementMapping compose action.
- Add it to flow [ADMIN]-Generate email for selected Email Content table rows [multiple emails] in the ReplacementMapping compose action.
IMPORTANT CONSIDERATIONS
- Expressions like
@{variables('Salutation')}must be replaced with wildcards such as{{var.salutation}}. - All
"in Email Body and Email Subject must be escaped as\". - All
"in Flow Name must be replaced with". - Check for special characters rendering incorrectly (often shown as
?). - Replace long dashes generated by MS Office with standard dashes.
- Flow names must not contain
&,", or other special characters. - Always test each new or updated email and visually verify the output.
Testing
New or updated emails must be tested using one of the following:
- [ADMIN]-Generate email for selected Email Content [single email]
- [ADMIN]-Generate email for selected Email Content table rows [multiple emails]
Notes:
- Enabled for review should be toggled to ON, on the Email Content table, for any flows that are to be selected by this flow.
- Email will be generated for visual review.